#include "driver.h"
#include "parser.hpp"
using namespace std;

std::ostringstream buffer;
Driver::Driver(){
}

Driver::Driver(string fileName){
    m_file = fileName;
}



Driver::~Driver(){
}

int Driver::parse(){
    m_loc.initialize(&m_file);
    scan_begin(); // 初始化词法分析器
    yy::parser parser(*this);
    parser.set_debug_level(false);
    int res = parser.parse();

    scan_end();
    return res;
}